<?php
include_once('common/header.php');
if($AppUI->id <= 0 || (isset($_SESSION['share_manual']) && (($_SESSION['share_manual']&1<<2) == 0))) {
	$this->_redirect(HOST_BACKEND);
}
$intId 						= $objRequest->getParam('id', 0);
$objSmanual					= new Smanual();
$objCategory				= new Category();
$arrInfo					= $objSmanual->get($intId);
if(isset($_SESSION['SHARE_MANUAL_POST']['pcategoryid']) && $_SESSION['SHARE_MANUAL_POST']['pcategoryid'] > 0) {
	$intCategoryId			= $_SESSION['SHARE_MANUAL_POST']['pcategoryid'];
} else {
	$intCategoryId			= $arrInfo['categoryid'];
}
$this->view->arrCategory	= $objCategory->getParent(SHARE_MANUAL_TYPE);
$this->view->arrSub			= $objCategory->getChild($intCategoryId);
$this->view->row			= $arrInfo;
$this->view->back			= isset($_SESSION[SESSION_BACKURL]) ? $_SESSION[SESSION_BACKURL] : HOST_BACKEND;